<?xml version="1.0" encoding="utf-8"?><!-- DWXMLSource="../../tmp/fUpitnik.xml" --><!DOCTYPE xsl:stylesheet  [
	<!ENTITY nbsp   "&#160;">
	<!ENTITY copy   "&#169;">
	<!ENTITY reg    "&#174;">
	<!ENTITY trade  "&#8482;">
	<!ENTITY mdash  "&#8212;">
	<!ENTITY ldquo  "&#8220;">
	<!ENTITY rdquo  "&#8221;"> 
	<!ENTITY pound  "&#163;">
	<!ENTITY yen    "&#165;">
	<!ENTITY euro   "&#8364;">
]>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html" encoding="utf-8"/>
<xsl:template match="/form/jqueries">
<script language="javascript">
function ajaxReady(){
	$.datepicker.setDefaults($.datepicker.regional['']);
<xsl:for-each select="./datePickers/*[dateFormat]" >$('#<xsl:value-of select="name()" />').datepicker({
	<xsl:for-each select="./*[text() != '']" >
		<xsl:if test="name() !='regional'">
			<xsl:variable name="apost"><xsl:if test="string(number(.)) = 'NaN'">'</xsl:if></xsl:variable>
				<xsl:value-of select="name()" />: <xsl:value-of select="$apost" /><xsl:value-of select="." /><xsl:value-of select="$apost" /><xsl:if test= "position() != last()">, 
				</xsl:if>
		</xsl:if>
	</xsl:for-each>});
	$('#<xsl:value-of select="name()" />').datepicker("option", $.datepicker.regional['<xsl:value-of select="regional" />']);
	$('#<xsl:value-of select="name()" />').live('focus', function(){
//	$.datepicker.setDefaults($.datepicker.regional['']);
	$('#<xsl:value-of select="name()" />').datepicker({
	<xsl:for-each select="./datePickers/*[text() != '']" >
		<xsl:if test="name() !='regional'">
			<xsl:variable name="apost"><xsl:if test="string(number(.)) = 'NaN'">'</xsl:if></xsl:variable>
				<xsl:value-of select="name()" />: <xsl:value-of select="$apost" /><xsl:value-of select="." /><xsl:value-of select="$apost" /><xsl:if test= "position() != last()">, 
				</xsl:if>
		</xsl:if>
	</xsl:for-each>});
	});
</xsl:for-each>

<xsl:for-each select="./autoCompleters/*[source]" >
	$('#<xsl:value-of select="name()" />').autocomplete({
	<xsl:for-each select="./*[text() != '' or count(./*) &gt; 0]" >
			<xsl:choose>
				<xsl:when test="count(./*) &gt; 0">
			<xsl:value-of select="name()" />:[<xsl:for-each select="*">'<xsl:value-of select="."/>'<xsl:if test= "position() != last()">, </xsl:if></xsl:for-each>]
				</xsl:when>
				<xsl:otherwise>
					<xsl:variable name="apost"><xsl:if test="string(number(.)) = 'NaN'">'</xsl:if></xsl:variable>
			<xsl:value-of select="name()" />: <xsl:value-of select="$apost" /><xsl:value-of select="." /><xsl:value-of select="$apost" />
				</xsl:otherwise>
			</xsl:choose>
			<xsl:if test= "position() != last()">, </xsl:if>
	</xsl:for-each>, delay:1000});
	$('#<xsl:value-of select="name()" />').live('focus', function(){
	$('#<xsl:value-of select="name()" />').autocomplete({
	<xsl:for-each select="./*[text() != '' or count(./*) &gt; 0]" >
			<xsl:choose>
				<xsl:when test="count(./*) &gt; 0">
			<xsl:value-of select="name()" />:[<xsl:for-each select="*">'<xsl:value-of select="."/>'<xsl:if test= "position() != last()">, </xsl:if></xsl:for-each>]
				</xsl:when>
				<xsl:otherwise>
			<xsl:variable name="apost"><xsl:if test="string(number(.)) = 'NaN'">'</xsl:if></xsl:variable>
			<xsl:value-of select="name()" />: <xsl:value-of select="$apost" /><xsl:value-of select="." /><xsl:value-of select="$apost" />
				</xsl:otherwise>
			</xsl:choose>
			<xsl:if test= "position() != last()">, </xsl:if>
	</xsl:for-each>});
	});
</xsl:for-each>
//	alert(1234);
});
</script>
</xsl:template>
</xsl:stylesheet>